//
//  pushViewController.m
//  qqqqqq
//
//  Created by iOSer on 16/5/18.
//  Copyright © 2016年 iOSer. All rights reserved.
//

#import "pushViewController.h"

@interface pushViewController ()
@property(nonatomic,strong) UISlider *mySlider;
@property(nonatomic,strong) UILabel *label;
@property(nonatomic,strong) UILabel *label2;
@property(nonatomic,strong) UIView *line;
@property(nonatomic,strong) UIButton *aaa;
@end

@implementation pushViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
//    self.navigationItem.title = @"轮播器跳转";
    
    [self.view setBackgroundColor:[UIColor whiteColor]];
    [self.navigationController setNavigationBarHidden:NO animated:YES];
    
    
}
-(void)viewWillAppear:(BOOL)animated{
    [self setupUI];
}
-(void)setupUI{
    [self.view addSubview:self.line];
    [self.view addSubview:self.aaa];
    [self.line makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.mas_topLayoutGuideBottom);
        make.left.equalTo(self.view);
        make.right.equalTo(self.view).offset(-TTRealValue(60));
        make.height.equalTo(@(10));
    }];
    [_aaa makeConstraints:^(MASConstraintMaker *make) {
        make.center.equalTo(self.view);
    }];
}
-(void)aaaClick{
    pushViewController *vc = [[pushViewController alloc] init];
    vc.navigationItem.title = @"课程";
    [self.navigationController pushViewController:vc animated:NO];
}
-(UIView *)line{
    if (!_line) {
        _line = [[UIView alloc] init];
        [_line setBackgroundColor:HEXColor(0x00cdd1, 1)];
    }
    return _line;
}
-(UIButton *)aaa{
    if (!_aaa) {
        _aaa = [UIButton new];
        [_aaa setBackgroundColor:HEXColor(0xff12ff, 1)];
        
        [_aaa setTitle:@"click" forState:UIControlStateNormal];
        [_aaa addTarget:self action:@selector(aaaClick) forControlEvents:UIControlEventTouchUpInside];
    }
    return _aaa;
}


@end
